import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import { resolve } from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  resolve: {
    alias: {
      '/@/': resolve(__dirname, '/src')
    }
  },
  server: {
		port: 5173,
		proxy: {
			'/api': {
				target: 'https://tco.truckego.net/tco/', // 目标服务  
				changeOrigin: true,
				rewrite: path => path.replace(/^\/api/, ''),
			}
		}
	},
});
